<div class="form">


<?php $form = $this->beginWidget('GxActiveForm', array(
	'id' => 'bill-detail-model-form',
	'enableAjaxValidation' => false,
));
?>

	<p class="note">
		<?php echo Yii::t('app', 'Fields with'); ?> <span class="required">*</span> <?php echo Yii::t('app', 'are required'); ?>.
	</p>

	<?php echo $form->errorSummary($model); ?>

		<div class="row">
		<?php echo $form->labelEx($model,'am_bill'); ?>
		<?php echo $form->textField($model, 'am_bill', array('maxlength' => 100)); ?>
		<?php echo $form->error($model,'am_bill'); ?>
		</div><!-- row -->
		<div class="row">
		
		<table>
			<tr>
				<td>
					<?php echo $form->labelEx($model,'created_datetime'); ?>
					<?php 
					$this->widget('zii.widgets.jui.CJuiDatePicker',
							array(
									// you must specify name or model/attribute
									'model'=>$model,
									'attribute'=>'created_datetime',
									//'name'=>'BackendBillDetailModel[created_datetime]',
										
									// optional: what's the initial value/date?
									//'value' => $model->projectDateStart
									'value' => empty($model->created_datetime)?date('d/m/Y'):date('d/m/Y', strtotime($model->created_datetime)),
										
									// optional: change the language
									'language' => 'en',
									//'language' => 'fr',
									//'language' => 'es',
										
									/* optional: change visual
									 * themeUrl: "where the themes for this widget are located?"
					* theme: theme name. Note that there must be a folder under themeUrl with the theme name
					* cssFile: specifies the css file name under the theme folder. You may specify a
					*          single filename or an array of filenames
					* try http://jqueryui.com/themeroller/
					*/
									'themeUrl' => Yii::app()->baseUrl.'/css/jui' ,
									'theme'=>'pool',	//try 'bee' also to see the changes
									'cssFile'=>array('jquery-ui.css' /*,anotherfile.css, etc.css*/),
										
										
									//  optional: jquery Datepicker options
									'options' => array(
											// how to change the input format? see http://docs.jquery.com/UI/Datepicker/formatDate
											'dateFormat'=>'dd/mm/yy',
												
											// user will be able to change month and year
											'changeMonth' => 'true',
											'changeYear' => 'true',
												
											// shows the button panel under the calendar (buttons like "today" and "done")
											'showButtonPanel' => 'true',
												
											// this is useful to allow only valid chars in the input field, according to dateFormat
											'constrainInput' => 'false',
												
											// speed at which the datepicker appears, time in ms or "slow", "normal" or "fast"
											'duration'=>'fast',
												
											// animation effect, see http://docs.jquery.com/UI/Effects
											'showAnim' =>'slide',
									),
										
										
									// optional: html options will affect the input element, not the datepicker widget itself
									'htmlOptions'=>array(
											'style'=>'height:30px;width:150px; 
						background:#ffbf00;
						color:#00a;
						font-weight:bold;
						font-size:0.9em;
						border: 1px solid #A80;
						padding-left: 4px;'
									)
							)
					);
					?>
				</td>
				<td>
					<label>Giờ</label>
					<select name="hour" style="width: 70px">
						<?php for($i=0; $i<24; $i++ ):?>
						<option value="<?php echo $i<10?"0".$i:$i?>"><?php echo $i?></option>
						<?php endfor;?>
					</select>
				</td>
				<td>
					<label>Phút</label>
					<select name="minute" style="width: 70px">
						<?php for($i=0; $i<60; $i+=5 ):?>
						<option value="<?php echo $i<10?"0".$i:$i?>"><?php echo $i?></option>
						<?php endfor;?>
					</select>
				</td>
				<td>
					<label>Giây</label>
					<select name="secon" style="width: 70px">
						<?php for($i=0; $i<60; $i+=5 ):?>
						<option value="<?php echo $i<10?"0".$i:$i?>"><?php echo $i?></option>
						<?php endfor;?>
					</select>
				</td>
			</tr>
		</table>
		<?php echo $form->error($model,'created_datetime'); ?>
		</div><!-- row -->
		<div class="row">
		<?php echo $form->labelEx($model,'receiver_name'); ?>
		<?php echo $form->textField($model, 'receiver_name', array('maxlength' => 255)); ?>
		<?php echo $form->error($model,'receiver_name'); ?>
		</div><!-- row -->


<?php
echo GxHtml::submitButton(Yii::t('app', 'Save'),array('class'=>'btn btn-success'));
$this->endWidget();
?>
</div><!-- form -->